In [1]:
%matplotlib inline

# OPTIONAL: Load the "autoreload" extension so that code can change
%load_ext autoreload

# OPTIONAL: always reload modules so that as you change code in src, it gets loaded
%autoreload 2

Data

In [2]:
from pvlib.iotools import read_epw
weather, meta = read_epw('../data/processed/meteo.epw')
weather.head()
Out[2]:
year month day hour minute data_source_unct temp_air temp_dew relative_humidity atmospheric_pressure ... ceiling_height present_weather_observation present_weather_codes precipitable_water aerosol_optical_depth snow_depth days_since_last_snowfall albedo liquid_precipitation_depth liquid_precipitation_quantity
2005-01-01 00:00:00+01:00 2005 1 1 1 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 7.1 1.5 68 98414 ... 99999 9 999999999 10 0.118 18 0 0.732 0.0 99.0
2005-01-01 01:00:00+01:00 2005 1 1 2 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 6.7 1.5 69 98414 ... 99999 9 999999999 10 0.118 18 0 0.717 0.0 99.0
2005-01-01 02:00:00+01:00 2005 1 1 3 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 6.4 1.0 68 98414 ... 99999 9 999999999 10 0.118 18 0 0.702 0.0 99.0
2005-01-01 03:00:00+01:00 2005 1 1 4 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 6.2 0.8 68 98414 ... 99999 9 999999999 10 0.118 18 0 0.689 0.0 99.0
2005-01-01 04:00:00+01:00 2005 1 1 5 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 6.0 0.5 68 98414 ... 99999 9 999999999 10 0.118 18 0 0.676 0.0 99.0

5 rows × 35 columns

In [3]:
import pandas as pd

summary = pd.read_csv('../data/processed/summary.csv')
summary.head()
Out[3]:
Zonenr Rel_BAL BAL_ENERGY DQAIRdt QHEAT QCOOL QINF QVENT QCOUPL QTRANS QGAININT QWGAIN QSOLGAIN QSOLAIR
0 1 0.0 1.548000e-08 234.9 7300.0 0.0 0.0 0.0 -436900.0 429900.0 0.0 0.0 0.0 0.0
1 2 0.0 6.835000e-09 113.0 29990000.0 0.0 -38920000.0 0.0 8200000.0 -205300.0 0.0 0.0 939900.0 0.0
2 3 0.0 -7.202000e-09 1212.0 58960.0 0.0 -1469000.0 0.0 -813700.0 -5457000.0 1215000.0 0.0 6467000.0 0.0
3 4 0.0 -4.229000e-08 2167.0 20150.0 0.0 -1685000.0 0.0 -5523000.0 -9769000.0 4704000.0 0.0 12250000.0 0.0
4 5 0.0 6.735000e-09 1822.0 47730.0 0.0 -1008000.0 0.0 -2289000.0 -4017000.0 2227000.0 0.0 5041000.0 0.0
In [4]:
energy_zones = pd.read_csv('../data/processed/energy_zones.csv')
energy_zones.head()
Out[4]:
TIME REL_BAL_ENERGY 1_B4_QBAL 1_B4_DQAIRdT 1_B4_QHEAT 1_B4_QCOOL 1_B4_QINF 1_B4_QVENT 1B4_QCOUP 1_B4_QTRANS ... 5_B4_QHEAT 5_B4_QCOOL 5_B4_QINF 5_B4_QVENT 5B4_QCOUP 5_B4_QTRANS 5_B4_QGINT 5_B4_QWGAIN 5_B4_QSOL 5_B4_QSOLAIR
0 0 0.0 2.523000e-11 -8.356 0.0 0.0 0.0 0.0 -41.42 33.07 ... 0.0 0.0 -83.14 0.0 62.85 -554.3 374.9 0.0 -1.070000e-12 0.0
1 1 0.0 1.478000e-11 -2.190 0.0 0.0 0.0 0.0 -42.78 40.59 ... 0.0 0.0 -56.99 0.0 97.38 -387.7 374.9 0.0 -2.884000e-13 0.0
2 2 0.0 3.435000e-12 2.555 0.0 0.0 0.0 0.0 -27.60 30.15 ... 0.0 0.0 -36.10 0.0 82.31 -395.9 374.9 0.0 3.505000e-12 0.0
3 3 0.0 1.552000e-11 -4.190 0.0 0.0 0.0 0.0 -29.01 24.82 ... 0.0 0.0 -37.67 0.0 72.04 -414.2 374.9 0.0 -1.149000e-12 0.0
4 4 0.0 5.542000e-13 -1.234 0.0 0.0 0.0 0.0 -27.87 26.64 ... 0.0 0.0 -38.77 0.0 64.68 -407.8 374.9 0.0 -2.478000e-12 0.0

5 rows × 62 columns

In [5]:
cultural_e = pd.read_csv('../data/processed/cultural-e.csv')
cultural_e.head()
Out[5]:
TIME SQHEAT_1 SQCOOL_1 TAIR_corridor TOP_corridor TAIR_bathroom TOP_bathroom TAIR_bed1_single TOP_bed1_single TAIR_livingRoom ... label.50 label.51 label.52 label.53 label.54 label.55 label.56 label.57 label.58 label.59
0 0 9360.0 0.0 21.9 21.9 21.0 20.8 21.9 21.9 22.9 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1 1 9440.0 0.0 21.8 21.9 21.0 20.8 21.9 21.8 22.6 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
2 2 6740.0 0.0 21.8 21.8 21.0 20.8 21.8 21.7 22.6 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
3 3 4460.0 0.0 21.8 21.8 21.0 20.8 21.8 21.7 22.6 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
4 4 4640.0 0.0 21.7 21.8 21.0 20.8 21.8 21.7 22.6 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

5 rows × 101 columns

Graphs

In [6]:
from src.visualization import visualize as viz

Climate

In [7]:
viz.air_temperature(weather)
2021-02-22T15:14:18.998190 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [8]:
viz.relative_humidity(weather)
2021-02-22T15:14:21.165988 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [9]:
viz.horizontal_irradiance(weather)
2021-02-22T15:14:22.247288 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/

Energy

In [10]:
viz.heating_loads(cultural_e)
2021-02-22T15:14:23.286883 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [11]:
viz.cooling_loads(cultural_e)
2021-02-22T15:14:24.343293 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [12]:
viz.energy_balance(summary)
2021-02-22T15:14:25.526395 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [13]:
for zone in ['1', '2', '3', '4', '5']:
    viz.zone_energy_balance(energy_zones, zone)
2021-02-22T15:14:29.368459 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
2021-02-22T15:14:32.286867 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
2021-02-22T15:14:34.083435 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
2021-02-22T15:14:38.140913 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
2021-02-22T15:14:40.181518 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [14]:
viz.monthly_consumption(cultural_e)
2021-02-22T15:14:42.326001 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [15]:
viz.self_production_consumption(cultural_e)
2021-02-22T15:14:43.316086 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/

Comfort

In [16]:
viz.psychrochart(cultural_e.sample(n=1000), 'bed1_single', weather.sample(n=1000)).get_figure()
Out[16]:
2021-02-22T15:14:52.109464 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [17]:
viz.airt_heatmap(cultural_e, 'bed1_single')
2021-02-22T15:14:57.572013 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [18]:
viz.shd_heatmap(cultural_e)
2021-02-22T15:15:00.867738 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [19]:
viz.win_heatmap(cultural_e)
2021-02-22T15:15:04.505454 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [20]:
viz.iaq_co2(cultural_e, ['LR'], ['BR1', 'BR2'])
2021-02-22T15:15:06.945281 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [21]:
viz.relh(cultural_e, ['RELHUM_livingRoom', 'RELHUM_bed1_single','RELHUM_bed2_double'], ['SCH_PER_LR', 'SCH_PER_BR1', 'SCH_PER_BR2'])
2021-02-22T15:15:07.763907 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [ ]: